/**
 * Created by zhaojm on 15/3/23.
 */
// 加速药水
game.HastePotion = frame.BaseRole.extend({

    ctor:function(){
        this._super();
        this._className = 'game.HastePotion';
    },

    update : function(dt){
        this._super(dt);


    },

    getNode : function(){
        return new cc.Sprite('#haste_potion.png');
    },

    getNodeHeight:function(){
        return this._node.getContentSize().height;
    },

    doCollidedWithHero : function(){
        this._layer.startSpeedUp();
        var bear = this._layer._bear;
        bear.heroSpeedUp();
        this.removeFromLayer();
    },

    doCollidedWithBear:function(){
        if(this._layer._speedUpTimeCount <= 0) {
            var bear = this._layer._bear;

            bear.setScale(bear.getScale() + 0.3);
        }
        this.removeFromLayer();
    },



});